# Makefile for a sample Opus 5 module # This is based on the structure of the real Opus makefile, but may be # adapted as you see fit # Declare some variables, so we must not change multiple lines # Object files for this module EXAMPLEOBJS = modinit.o ModuleEntry.o ExampleRequest.o Window.o HiddenCommand.o buildinstrings.o # You should always have the modinit.o on the first place. After this # there should be your file with the L_ModuleEntry() function. All other # may follow like you want... # Library-Name/-Version/-Revision # use only lowercase for the name of the module MODULENAME = example.module EXAMPLEVER = 56 EXAMPLEREV = 0 # Compiler options CCOPTS = noversion optimize # Linker options SLINKOPTS = noicons smallcode smalldata ####################################################################### # If you have "ALL" in the tooltypes of your "Build" icon, this objects # will be created... ALL: includes/buildin.strings $(MODULENAME) ####################################################################### # Note to the line starting with "lib" : # The last entry is an object library created by Dirk Stoecker. This # does supply some replacements for the string.h and some other stuff # (in conclusion with sdi_std.h) # This results in smaller code. It is your choice ... # If you don't want use it, delete "lib:sdi_std.lib", but you must # include instead the "string.h" (if you need their functions). # Do not modify other stuff here !!! $(MODULENAME): $(EXAMPLEOBJS) smakefile scoptions slink with << libprefix _L_ libfd modules.fd from lib:libent.o lib:libinit.o $(EXAMPLEOBJS) to $@ lib lib:sc.lib lib:amiga.lib lib:dopuslib.lib /sc/lib/sdi_std.lib libversion $(EXAMPLEVER) librevision $(EXAMPLEREV) $(SLINKOPTS) < ####################################################################### # This will create the string file buildinstrings.o : includes/buildin.strings setdate buildinstrings.c sc buildinstrings.c # ModuleEntry.o: ModuleEntry.c includes/Project.h # ExampleRequest.o: ExampleRequest.c includes/ExampleRequest.h includes/Project.h includes/buildin.strings # Window.o: Window.c includes/Window.h includes/Project.h includes/buildin.strings # HiddenCommand.o: HiddenCommand.c includes/Project.h includes/buildin.strings # modinit.o: modinit.c ####################################################################### # Build what from what and how... .c.o: sc $(CCOPTS) $*.c .asm.o: sc:c/asm -iASMINC: $*.asm .cd.strings: catcomp descriptor=$*.cd cfile=$*.strings ####################################################################### # Done only if the tooltype CLEAN is supplied ... clean: delete ~(\#?_strings).o quiet copy *.module DOpus5:modules setdate \#?.cd ####################################################################### # My choice :-) (, but first "ALL" ) copy: copy *.module DOpus5:modules wait 5 avail flush #######################################################################